Use MyAnim
Go
Delete from AnimeTeam;
Delete from AnimeGenre;
Delete from Quality;
delete from Genre;
Delete from Anime;
Delete from Team;
Delete from Server;


INSERT INTO Team(Url,Name,UsedSpace,FreeSpace,TotalSpace)VALUES('http://www.MyTeam.com','My Team',0,200,200)
INSERT INTO Team(Url,Name,UsedSpace,FreeSpace,TotalSpace)VALUES('http://www.MyNewTeam.com','My New Team',100,100,200)

Insert Into Server(Name, Address, Enabled) Values ('Server1', '127.0.0.1', 1);
Insert Into Server(Name, Address, Enabled) Values ('ServerKim', '127.0.0.2', 0);
Insert Into Server(Name, Address, Enabled) Values ('Server2', '127.0.0.3', 0);

Insert Into Anime(Name, NbEpisode) Values('Soul Eater', 50);
Insert Into Anime(Name, NbEpisode) Values('Fairy Tail', 129);
Insert Into Anime(Name, NbEpisode) Values('Naruto', 500);
Insert Into Anime(Name, NbEpisode) Values('Bleach', 800);
Insert Into Anime(Name, NbEpisode) Values('XXX Holic', 42);

Insert Into AnimeTeam(ID_Team, ID_Anime) Select Team.ID, Anime.ID From Team, Anime Where Team.FreeSpace = 200 And Anime.ID > 3;
Insert Into AnimeTeam(ID_Team, ID_Anime) Select Team.ID, Anime.ID From Team, Anime Where Team.FreeSpace = 100 And Anime.ID <= 3;

Insert Into Genre(Name) Values('Action');
Insert Into Genre(Name) Values('Fantastique');
Insert Into Genre(Name) Values('Combat');

Insert Into AnimeGenre(ID_Anime, ID_Genre) Select Anime.ID, Genre.ID From Anime, Genre Where Anime.Name <> 'XXX Holic';
Insert Into AnimeGenre(ID_Anime, ID_Genre) Select Anime.ID, Genre.ID From Anime, Genre Where Anime.Name = 'XXX Holic' And Genre.Name = 'Fantastique';

Insert Into Quality(Lib) Values('480p');
Insert Into Quality(Lib) Values('720p');
Insert Into Quality(Lib) Values('1080p');

Insert Into URank(Name) Values('Admin');
Insert Into URank(Name) Values('TeamAdmin');
Insert Into URank(Name) Values('TeamMember');
Insert Into URank(Name) Values('TeamUploader');



